<template>
  <div class="record2">
    <span class="money" :class="{ 'money-': money < 0 }">{{
      money > 0 ? "+" + money : money
    }}</span>
    <div class="left">
      <div class="top">
        【<span class="name">{{ name }}</span
        >】 <span class="desc">{{ desc }}</span>
      </div>
      <span class="date">{{ date }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "Record2",
  props: {
    money: Number,
    name: String,
    desc: String,
    date: String
  }
};
</script>

<style scoped lang="less">
.record2 {
  width: 100%;
  border-top: 1px solid #cacaca;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;

  &:last-child {
    border-bottom: 1px solid #cacaca;
  }

  .money {
    font-size: 18px;
    font-weight: 600;
    text-align: left;
    color: #333333;
  }

  .money- {
    color: #ca5252;
  }

  .left {
    display: flex;
    flex-direction: column;

    .top {
      font-size: 14px;
      font-weight: 400;
      text-align: right;
      color: #333333;
      margin-bottom: 5px;

      .name {
      }

      .desc {
      }
    }

    .date {
      font-size: 12px;
      font-weight: 200;
      text-align: right;
      color: #666666;
    }
  }
}
</style>
